package com.qf.leadnewsbehavior.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class RedisService {

    @Autowired
    private StringRedisTemplate redisTemplate;

    public void incr(String key) {
        redisTemplate.opsForValue().increment(key);
    }

    public void bitmap(String key, Long offset, Integer ops) {
        redisTemplate.opsForValue().setBit(key,offset,ops==0);
    }
}
